﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using projectManagementWeb.Validations;

namespace projectManagementWeb.Models.Developer
{

    public class TaskListModel
    {
        projectmanagementDBDataContext _dbContext = null;
        public TaskListModel()
        {
            _dbContext = new projectmanagementDBDataContext();
        }


        [TaskListValidationAttribute]
        public List<TaskDescriptionModel> taskList { get; set; }

        public IEnumerable<SelectListItem> StatusList
        {
            get
            {
                
                IEnumerable<SelectListItem> projectLeaderID = _dbContext.spGetDeveloperStatusFlags()
            .Select(i => new SelectListItem
            {
                Value = i.ID.ToString(),
                Text = i.name.ToString()
            });

                return projectLeaderID;
            }
        }
    }
}